<?php
/**
 * @subpackage	LightBreeze v1.7 HM01J
 * @copyright	Copyright (C) 2010-2013 Hurricane Media - All rights reserved.
 * @license		GNU General Public License version 2 or later; see LICENSE.txt
 */
defined('_JEXEC') or die('Restricted access');
$LeftMenuOn = ($this->countModules('position-4') or $this->countModules('position-5') or $this->countModules('position-7'));
$RightMenuOn = ($this->countModules('position-6') or $this->countModules('position-8'));
$TopNavOn = ($this->countModules('position-13'));

$app = JFactory::getApplication();
$sitename = $app->getCfg('sitename');
$sitetitle = $this->params->get('sitetitle');
$sitedescription = $this->params->get('sitedescription');

$logopath = $this->baseurl . '/templates/' . $this->template . '/images/logo.gif';
$logo = $this->params->get('logo', $logopath);
$logoimage = $this->params->get('logoimage');
?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $this->language; ?>" lang="<?php echo $this->language; ?>" dir="<?php echo $this->direction; ?>">
    <head>
        <jdoc:include type="head" />
        <link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/system/css/system.css" type="text/css" />
        <link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/system/css/general.css" type="text/css" />
        <link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/<?php echo $this->template; ?>/css/template.css" type="text/css" />
        <link href='http://fonts.googleapis.com/css?family=Oswald' rel='stylesheet' type='text/css' />
        <script type="text/javascript" src="<?php echo $this->baseurl ?>/templates/<?php echo $this->template; ?>/js/lib.js"></script>
        <script type="text/javascript" src="<?php echo $this->baseurl ?>/templates/<?php echo $this->template; ?>/js/jlibs.js"></script>
        <script type="text/javascript" src="<?php echo $this->baseurl ?>/templates/<?php echo $this->template; ?>/js/common.js"></script>
        <script type="text/javascript" src="<?php echo $this->baseurl ?>/templates/<?php echo $this->template; ?>/js/sfhover.js"></script>
    </head>
    <body>
        <div id="wrapper">
            <div id="header">
                <!-- TopNav -->
                <?php if ($TopNavOn): ?>
                    <div id="topnav">
                        <jdoc:include type="modules" name="position-13" style="xhtml" />
                    </div>
                <?php endif; ?>	
                <?php if ($this->countModules('slideshow')): ?>
                    <div class="slideshow">
                        <jdoc:include type="modules" name="slideshow" />
                    </div>
                <?php endif; ?>
            </div>
            <div id="topmenu">
                <jdoc:include type="modules" name="position-1" />
            </div>
            <!-- Breadcrumbs -->
            <?php if ($this->countModules('position-2')): ?>
                <div id="breadcrumbs">
                    <jdoc:include type="modules" name="position-2" />
                </div>
            <?php endif; ?>
            <!-- Left Menu -->
            <?php if ($LeftMenuOn): ?>
                <div id="leftmenu">
                    <div id="search">		
                        <jdoc:include type="modules" name="position-0" />
                    </div>
                    <jdoc:include type="modules" name="position-7" style="xhtml" />
                    <jdoc:include type="modules" name="position-4" style="xhtml" />
                    <jdoc:include type="modules" name="position-5" style="xhtml" />
                </div>
            <?php endif; ?>
            <!-- Contents -->
            <?php ?>
            <div id="content-w<?php
            if ($LeftMenuOn AND $RightMenuOn):
                echo '1';
            elseif ($LeftMenuOn OR $RightMenuOn):
                echo '2';
            else:
                echo '3';
            endif;
            ?>">
                     <?php if ($this->countModules('position-12')): ?>
                    <div id="content-top">
                        <jdoc:include type="modules" name="position-12" />
                    </div>
                <?php endif; ?>
                <jdoc:include type="message" />
                <jdoc:include type="component" />
            </div>
            <!-- Right Menu -->
            <?php if ($RightMenuOn): ?>
                <div id="rightmenu">
                    <jdoc:include type="modules" name="position-6" style="xhtml" />
                    <jdoc:include type="modules" name="position-8" style="xhtml" />
                    <jdoc:include type="modules" name="position-3" style="xhtml" />
                </div>
            <?php endif; ?>
            <!-- Footer -->
            <div id="footer">
                <jdoc:include type="modules" name="position-14" />
            </div>        
            <!-- Page End -->
            <div id="copyright">&copy;<?php echo date('Y'); ?> <?php echo $sitename; ?> | Template by <a href="http://www.byggeklodser.com">BKL.com</a><br/> 
            </div>
        </div>
    </body>
</html>